<template>
    <div>
        <input v-model="searchText">
        <br>
        <p>{{searchText}}</p>

        <hr>
        <span>v-model等价于v-bind加v-on</span>

        <input
                v-bind:value="searchText2"
                v-on:input="searchText2 = $event.target.value">
        <br>
        <p>{{searchText2}}</p>

        <hr>
        <span>使用自定义custom-input</span>

        <customInput v-model="searchText3"></customInput>


    </div>
</template>

<script>
    import customInput from './custom-input'
    export default {
        name: "com1-test",
        components:{
          customInput
        },
        data(){
            return {
                searchText:'',
                searchText2:'',
                searchText3:''
            }
        }
    }
</script>

<style scoped>

</style>